package com.iqiyi.pps.epg.core.model.channel;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.HashMap;
import java.util.Map;

@Entity
@Table(name = "channel_base")
@Cache(usage = CacheConcurrencyStrategy.NONE)
public class ChannelBase {
    public static final int ENABLE = 1;
    public static final int DISABLE = 0;

    public static final int HAS_BROADCAST = 1;
    public static final int NO_BROADCAST = 0;
    public static final int HAS_PROGRAMS = 1;
    public static final int NO_PROGRAMS = 0;
    public static final int HAS_STREAM = 1;
    public static final int NO_STREAM = 0;

    public final static int LIVE_TYPE_CT = 1;
    public final static int LIVE_TYPE_LS = 2;
    public final static int LIVE_TYPE_LB = 3;

    public static final Map<Integer, String> ENABLE_MAP = new HashMap<Integer, String>() {{
        put(-1, "删除");
        put(1, "有效");
        put(0, "无效");

    }};

    public static final Map<Integer, String> SYNC_MAP = new HashMap<Integer, String>() {{
        put(0, "未同步");
        put(1, "已同步");

    }};

    public static final Map<Integer, String> LIVE_TYPE_MAP = new HashMap<Integer, String>() {{
        put(1, "常规");
        put(2, "临时");
        put(3, "轮播台");
    }};

    public static final Map<Integer, String> TYPE_MAP = new HashMap<Integer, String>() {{
        put(1, "卫视");
        put(2, "地方台");
        put(3, "中央台");
        put(4, "境外台");
        put(5, "爱奇艺直播台");
        put(6, "临时体育赛事");
        put(7, "临时综艺晚会");
        put(8, "临时发布会");
        put(9, "临时演唱会");
        put(10, "临时电子竞技");

    }};

    public static final Map<Integer, String> LIVETYPE_MAP = new HashMap<Integer, String>() {{
        put(1, "ct");
        put(2, "ls");
        put(3, "lb");
    }};

    private Long id;
    private Long qipuId;
    private Long oldQipuId;
    private String name;
    private String shortName;
    private String universalCode;
    private String description;
    private Long passportId;
    private Long ppsBaikeId;
    private Integer liveType;
    private Integer type;
    private String location;
    private Integer maxPlaybackPeriod;
    private String tempName;
    private Timestamp tempStartTime = new Timestamp(System.currentTimeMillis());
    private Timestamp tempEndTime = new Timestamp(System.currentTimeMillis());
    private Long qitanId;
    private Long logoEntityId;
    private String logoUrl;
    private Integer orderBy;
    private Integer isEnable;
    private Timestamp addTime = new Timestamp(System.currentTimeMillis());
    private Timestamp updateTime;
    private Integer isSync;
    private String operator;
    private String pageUrl;
    private String defaultLogoUrl;
    private int allowPopups;
    private int shouldDisplay;
    private Integer hasBroadcast = 0;
    private Integer hasPrograms = 0;
    private Integer hasStream = 0;
    private Timestamp episodeUpdateTime; // 节目单最新更新时间
    private Integer isQiyiProduced = 0; // 是否奇艺出品 1 是 0 否
    private Integer exclusiveStatusIqiyi = 0; // 是否奇艺独播 1 是0 否
    private Integer interruptHintType = 1;
    private String alternatePlayCollection;     //备播库
    private Integer carouselTableNo;
    private String panoFormat;
    private int sliceDelay;  // 压流延时
    private String subjectUrl;
    private int automation;
    private int userCount;
    private int cyclical;
    private int formal;
    private String threeD;

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "qipu_id")
    public Long getQipuId() {
        return qipuId;
    }

    public void setQipuId(Long qipuId) {
        this.qipuId = qipuId;
    }

    @Column(name = "old_qipu_id")
    public Long getOldQipuId() {
        return oldQipuId;
    }

    public void setOldQipuId(Long oldQipuId) {
        this.oldQipuId = oldQipuId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Column(name = "short_name")
    public String getShortName() {
        return shortName;
    }

    public void setShortName(String shortName) {
        this.shortName = shortName;
    }

    @Column(name = "universal_code")
    public String getUniversalCode() {
        return universalCode;
    }

    public void setUniversalCode(String universalCode) {
        this.universalCode = universalCode;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Column(name = "passport_id")
    public Long getPassportId() {
        return passportId;
    }

    public void setPassportId(Long passportId) {
        this.passportId = passportId;
    }

    @Column(name = "pps_baike_id")
    public Long getPpsBaikeId() {
        return ppsBaikeId;
    }

    public void setPpsBaikeId(Long ppsBaikeId) {
        this.ppsBaikeId = ppsBaikeId;
    }

    @Column(name = "live_type")
    public Integer getLiveType() {
        return liveType;
    }

    public void setLiveType(Integer liveType) {
        this.liveType = liveType;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    @Column(name = "max_playback_period")
    public Integer getMaxPlaybackPeriod() {
        return maxPlaybackPeriod;
    }

    public void setMaxPlaybackPeriod(Integer maxPlaybackPeriod) {
        this.maxPlaybackPeriod = maxPlaybackPeriod;
    }

    @Column(name = "temp_name")
    public String getTempName() {
        return tempName;
    }

    public void setTempName(String tempName) {
        this.tempName = tempName;
    }

    @Column(name = "temp_start_time")
    public Timestamp getTempStartTime() {
        return tempStartTime;
    }

    public void setTempStartTime(Timestamp tempStartTime) {
        this.tempStartTime = tempStartTime;
    }

    @Column(name = "temp_end_time")
    public Timestamp getTempEndTime() {
        return tempEndTime;
    }

    public void setTempEndTime(Timestamp tempEndTime) {
        this.tempEndTime = tempEndTime;
    }

    @Column(name = "qitan_id")
    public Long getQitanId() {
        return qitanId;
    }

    public void setQitanId(Long qitanId) {
        this.qitanId = qitanId;
    }

    @Column(name = "logo_entity_id")
    public Long getLogoEntityId() {
        return logoEntityId;
    }

    public void setLogoEntityId(Long logoEntityId) {
        this.logoEntityId = logoEntityId;
    }

    @Column(name = "logo_url")
    public String getLogoUrl() {
        return logoUrl;
    }

    public void setLogoUrl(String logoUrl) {
        this.logoUrl = logoUrl;
    }

    @Column(name = "order_by")
    public Integer getOrderBy() {
        return orderBy;
    }

    public void setOrderBy(Integer orderBy) {
        this.orderBy = orderBy;
    }

    @Column(name = "is_enable")
    public Integer getIsEnable() {
        return isEnable;
    }

    public void setIsEnable(Integer isEnable) {
        this.isEnable = isEnable;
    }

    @Column(name = "add_time", updatable = false)
    public Timestamp getAddTime() {
        return addTime;
    }

    public void setAddTime(Timestamp addTime) {
        this.addTime = addTime;
    }

    @Column(name = "update_time", insertable = false, updatable = false)
    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    @Column(name = "is_sync")
    public Integer getIsSync() {
        return isSync;
    }

    public void setIsSync(Integer isSync) {
        this.isSync = isSync;
    }

    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    @Column(name = "page_url")
    public String getPageUrl() {
        return pageUrl;
    }

    public void setPageUrl(String pageUrl) {
        this.pageUrl = pageUrl;
    }

    @Column(name = "default_logo_url"  , updatable = false)
    public String getDefaultLogoUrl() {
        return defaultLogoUrl;
    }

    public void setDefaultLogoUrl(String defaultLogoUrl) {
        this.defaultLogoUrl = defaultLogoUrl;
    }

    @Column(name = "allow_popups")
    public int getAllowPopups() {
        return allowPopups;
    }

    public void setAllowPopups(int allowPopups) {
        this.allowPopups = allowPopups;
    }

    @Column(name = "should_display")
    public int getShouldDisplay() {
        return shouldDisplay;
    }

    public void setShouldDisplay(int shouldDisplay) {
        this.shouldDisplay = shouldDisplay;
    }

    @Column(name = "has_broadcast")
    public Integer getHasBroadcast() {
        return hasBroadcast;
    }

    public void setHasBroadcast(Integer hasBroadcast) {
        this.hasBroadcast = hasBroadcast;
    }

    @Column(name = "has_programs")
    public Integer getHasPrograms() {
        return hasPrograms;
    }

    public void setHasPrograms(Integer hasPrograms) {
        this.hasPrograms = hasPrograms;
    }

    @Column(name = "has_stream", updatable = false)
    public Integer getHasStream() {
        return hasStream;
    }

    public void setHasStream(Integer hasStream) {
        this.hasStream = hasStream;
    }

    @Column(name = "episode_update_time")
    public Timestamp getEpisodeUpdateTime() {
        return episodeUpdateTime;
    }

    public void setEpisodeUpdateTime(Timestamp episodeUpdateTime) {
        this.episodeUpdateTime = episodeUpdateTime;
    }

    @Column(name = "is_qiyi_produced")
    public Integer getIsQiyiProduced() {
        return isQiyiProduced;
    }

    public void setIsQiyiProduced(Integer isQiyiProduced) {
        this.isQiyiProduced = isQiyiProduced;
    }

    @Column(name = "exclusive_status_iqiyi")
    public Integer getExclusiveStatusIqiyi() {
        return exclusiveStatusIqiyi;
    }

    public void setExclusiveStatusIqiyi(Integer exclusiveStatusIqiyi) {
        this.exclusiveStatusIqiyi = exclusiveStatusIqiyi;
    }

    @Column(name = "interrupt_hint_type")
    public Integer getInterruptHintType() {
        return interruptHintType;
    }

    public void setInterruptHintType(Integer interruptHintType) {
        this.interruptHintType = interruptHintType;
    }

    @Column(name = "alternate_play_collection")
    public String getAlternatePlayCollection() {
        return alternatePlayCollection;
    }

    public void setAlternatePlayCollection(String alternatePlayCollection) {
        this.alternatePlayCollection = alternatePlayCollection;
    }

    @Column(name = "carousel_table_no")
    public Integer getCarouselTableNo() {
        return carouselTableNo;
    }

    public void setCarouselTableNo(Integer carouselTableNo) {
        this.carouselTableNo = carouselTableNo;
    }

    @Column(name = "pano_format")
    public String getPanoFormat() {
        return panoFormat;
    }

    public void setPanoFormat(String panoFormat) {
        this.panoFormat = panoFormat;
    }

    @Column(name = "slice_delay")
    public int getSliceDelay() {
        return sliceDelay;
    }

    public void setSliceDelay(int sliceDelay) {
        this.sliceDelay = sliceDelay;
    }

    @Column(name = "subject_url")
    public String getSubjectUrl() {
        return subjectUrl;
    }

    public void setSubjectUrl(String subjectUrl) {
        this.subjectUrl = subjectUrl;
    }

    @Column(name = "is_automation")
    public int getAutomation() {
        return automation;
    }

    public void setAutomation(int automation) {
        this.automation = automation;
    }

    @Column(name = "user_count")
    public int getUserCount() {
        return userCount;
    }

    public void setUserCount(int userCount) {
        this.userCount = userCount;
    }

    @Column(name = "cyclical")
    public int getCyclical() {
        return cyclical;
    }

    public void setCyclical(int cyclical) {
        this.cyclical = cyclical;
    }

    @Column(name = "formal")
    public int getFormal() {
        return formal;
    }

    public void setFormal(int formal) {
        this.formal = formal;
    }

    @Column(name = "three_d_format")
    public String getThreeD() {
        return threeD;
    }

    public void setThreeD(String threeD) {
        this.threeD = threeD;
    }
}
